/*
 * Part of knowledge engineering (ke) course work, 2010/11
 */
package se.bth.ke.firstfriend.model.validation;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import se.bth.ke.firstfriend.model.User;

/**
 *
 * @author nico
 */
public class VerifiedSingleUserValidator implements ConstraintValidator<SingleUser, User> {

    @PersistenceContext
    private EntityManager em;

    @Override
    public void initialize(SingleUser constraintAnnotation) {
        
    }

    @Override
    public boolean isValid(User user, ConstraintValidatorContext context) {
        System.out.println(em);
        System.out.println(user);
        return true;
    }    
}
